Mobile devices such as mobile phones, personal digital/data assistants (“PDAs”), two-way pagers, etc. are relatively inexpensive, have become commonplace, and are available to most consumers. These mobile network devices can be wireless or wired mobile devices.
Such mobile devices are typically limited to small physical size, light weights and corresponding small display screen sizes. These mobile devices have a number of constraints including limited processing power, limited memory, limited battery life, a limited number of buttons on a user interface, etc.
The larger a processor in a mobile device, the larger the size and weight the device will be. The more memory in a device the more expensive it will be. Faster processors, more memory and color displays consume more battery power.
Content and service providers who provide content and services via mobile devices have to balance the physical constraints of such mobile devices along with the ability to provide applications and content that consumers actually want, and are willing to pay for. The content and services has to be provided to mobile devices in a format that is usable on the mobile device and has to be provided quickly since most users of mobile devices pay for content and services by the minute.
Electronic content such as text, hypertext, graphical data, applications, graphical data images, audio, video, other content or references to such electronic content can be stored by a content provider. For example, the electronic content can be stored in a database server. The database server may reside on a network or other location accessible by the mobile device. The database server downloads or “serves” electronic content from the database to the mobile device.
One way to format and send content to a mobile device is by using a markup language. Markup languages provide control over formatting and layout of electronic content. For example, the electronic content can be embedded into a markup language document. In addition to supporting embedded content, markup language documents also allow references to electronic content. The markup language document can be displayed on the mobile device, for example, using a browser.
One such markup language document is a hypertext document, which can include markup codes called “tags.” The structure of hypertext documents is defined by document markup languages such as Hand Held Device Markup Language (“HDML”), Wireless Markup Language (“WML”), Hypertext Markup Language (“HTML”), compact HTML (“cHTML”), eXtensible Markup Language (“XML”), WML and voice extensible Markup Language (“VoxML”), and others.
To create the markup language document, an application generally obtains one or more templates. The templates define the layout and other properties of the markup language document, but they do not define the data needed by the markup language document. In order to determine what data the template uses, the application accesses a class, or other similar object, for the template.
The class can be preprogrammed by a developer, and it can include a definition of the data need by the particular template. For each available template, the application stores a corresponding class that defines the data needed for that template. When the template is called, the application accesses the corresponding class and determines the data needed by the template. The application then obtains the data and uses it in conjunction with the template to create the markup language document.
Obtaining the data in this manner, however, can have several disadvantages. In one disadvantage, each template must have a corresponding class that defines that data it needs. This reduces the flexibility in making changes to a template. For example, a change in the template that eliminates the need for certain data or adds a need for additional data must be accompanied by a corresponding change in the class that defines the data for the template. Changing the corresponding class can be a complicated and time-consuming process, thereby decreasing the ease with which changes can be made to the template.
In another disadvantage, a particular markup language document may be created using multiple templates. In order to determine the necessary data for the all templates, the application processes each template in turn. For example, the application accesses a class for the first template in order to determine the data it needs, and then it retrieves that data for that template. The application then determines and retrieves the data needed for a second template. This process continues for all the remaining templates. Thus, when multiple templates are used, the application performs a series of sequential data accesses in order to obtain the data needed by all the templates. Multiple sequential data accesses take time and consume processing power, and are therefore an inefficient way to access data.
Therefore, there exists a need for a better way to create and format markup language documents for a mobile device.